use salvo::handler;
use salvo::Request;

use crate::config::api_config::ApiResult;
use crate::service::menu_service::MenuService;

#[handler]
#[tracing::instrument]
pub async fn add_menu(request: &mut Request) -> ApiResult<()> {
    ApiResult::from(MenuService::add_menu(request).await)
}

#[handler]
#[tracing::instrument]
pub async fn del_menu(request: &mut Request) -> ApiResult<()> {
    ApiResult::from(MenuService::del_menu(request).await)
}
